<?php
require_once $_SERVER['DOCUMENT_ROOT'].'/actions/qualitydepartmentemployee/QualityDepartmentEmployeeAction.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/actions/Response.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/model/Service/Service.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/model/Service/ServiceFactory.php';

final class IndicatorDeleteAction extends QualityDepartmentEmployeeAction  {
	protected function execute(Response $response) {
		if(isset($_POST['id_indicator'])) {
			$serviceFactory = new ServiceFactory();
			$service = $serviceFactory->getService('IndicatorService');
			$service->delete($_POST['id_indicator']);
		}
		$response->setActionPath('/editing/process/edit.html');
	}
}
?>